﻿namespace = mcfm_birth

#Reveal/hide w/ send to celebration event if parent is fitting
mcfm_birth.0001 = {
    type = character_event
    title = mcfm_birth.0001.t
    desc = {
        triggered_desc  = {
            trigger = {
                root = {
                    AND = {
                        OR = {
                            faith = { has_doctrine = futa_doctrine_futanari_equality_virtuous }
                            faith = { has_doctrine = futa_doctrine_futanari_equality_venerated }
                        }
                        scope:child = {
                            any_liege_or_above = {
                                OR = {
                                    faith = { has_doctrine = futa_doctrine_futanari_equality_crime }
                                    faith = { has_doctrine = futa_doctrine_futanari_equality_shunned }
                                }
                            }
                        }
                    }
                }
            }
            desc = mcfm_birth.0001.desc.b
        }
        desc = mcfm_birth.0001.desc.a
    }

    theme = secret
    override_background = { reference = bedchamber }
    left_portrait = {
        character = root
        animation = shock
    }
    right_portrait = {
        character = scope:mother
        animation = shock
        outfit_tags = { nightgown }
    }
    lower_right_portrait = {
        character = scope:child
        animation = newborn
    }

    #Hide
    option = {
        name = mcfm_birth.0001.a
        add_stress = minor_stress_gain

        ai_chance = {
            base = 80
            modifier = {
                add = 20
                OR = {
                    has_trait = ambitious
                    has_trait = arrogant
                    has_trait = deceitful
                }
            }
        }
    }
    #Expose/Celebration
    option = {
        name = mcfm_birth.0001.b
        scope:child = { add_trait = futa_exposed }

        if = {
            limit = { 
                root = {
                    OR = {
                        faith = { has_doctrine = futa_doctrine_futanari_equality_virtuous }
                        faith = { has_doctrine = futa_doctrine_futanari_equality_venerated }
                    }
                }
             }
             trigger_event = { id = mcfm_birth.0002 days = 0 }
        }
        else = {
            scope:father = { 
                add_prestige = -333
                add_stress = minor_stress_gain
            }
            scope:mother = { 
                add_prestige = -333
                add_stress = minor_stress_gain
            }
        }

        ai_chance = {
            base = 25
            modifier = {
                add = 40
                root = {
                    OR = {
                        faith = { has_doctrine = futa_doctrine_futanari_equality_virtuous }
                        faith = { has_doctrine = futa_doctrine_futanari_equality_venerated }
                    }
                }
            }
            modifier = {
                add = 15
                has_trait = honest
            }
        }
    }

    #Kill
    option = {
        name = mcfm_birth.0001.c
        trigger = {
            OR = {
                has_trait = sadistic

                has_trait = callous
                AND = {
                    root = { faith = { has_doctrine = futa_doctrine_futanari_equality_crime } }
                    has_trait = zealous
                }
            }
        }

        scope:child = {
            death = {
                death_reason = death_vanished
            }
        }
        add_stress = minor_stress_gain

        ai_chance = {
            base = 15
            modifier = {
                add = 15
                OR = {
                    has_trait = ambitious
                    has_trait = arrogant
                    has_trait = deceitful
                }
            }
            modifier = {
                add = 25
                OR = {
                    has_trait = sadistic
                    has_trait = callous
                    AND = {
                        root = { faith = { has_doctrine = futa_doctrine_futanari_equality_crime } }
                        has_trait = zealous
                    }
                }
            }
        }
    }
}

#Celebration event
mcfm_birth.0002 = {
    type = character_event
    title = mcfm_birth.0002.t
    desc = mcfm_birth.0002.desc
    theme = faith
    override_background = { reference = bedchamber }
    left_portrait = {
        character = root
        animation = celebration
    }
    lower_right_portrait = {
        character = scope:child
        animation = newborn
    }

    option = {
        name = mcfm_birth.0002.a
    }
}